#include "SMPPSubmitSMResp.hpp"

using namespace smpp::pdu;

SubmitSMResp::SubmitSMResp(const Header &nHeader,
const CoctetString &nMessageId,
const MessageSubmissionResponseTLVs &nMessageSubmissionResponseTLVs):
Header(nHeader),
_MessageId(nMessageId),
MessageSubmissionResponseTLVs(nMessageSubmissionResponseTLVs){}

SubmitSMResp::SubmitSMResp(const SubmitSMResp &nSubmitSMResp):
Header(nSubmitSMResp),
_MessageId(nSubmitSMResp.getMessageId()),
MessageSubmissionResponseTLVs(nSubmitSMResp){}

void SubmitSMResp::setMessageId(const CoctetString &sMessageId){
	_MessageId = sMessageId;
}

const CoctetString &SubmitSMResp::getMessageId() const{
	return _MessageId;
}

void SubmitSMResp::calcCommandLength(){
	_CommandLength = 16 + _MessageId.size() +
		MessageSubmissionResponseTLVs::getLength();
}
